<?php include "top_page.php"; ?>

<h1>MServ</h1>

<div class="login_box">
<form id="login_box" name="login_box" method="POST" action="">
<input type="hidden" name="log_in" value="1"/>
	<p>
	<label for="username"><?php echo _("Login :"); ?></label>
	<input type="text" name="username" />
	</p>
	<p>
	<label for="password"><?php echo _("Password :"); ?></label>
	<input type="password" name="password" />
	</p>
	<p>
	<label for="host"><?php echo _("Server :"); ?></label>
	<input type="text" name="host" />
	</p>
	<p>
	<label for="language"><?php echo _("Language :"); ?></label>
	<?php
		$lang = explode(",", $_SERVER["HTTP_ACCEPT_LANGUAGE"]);
		for($i = 0; $i < sizeof($lang); $i++) {
			if(substr($lang[$i], 0, 2) == "en") {
				$deflang = "en";
				break;
			} else if(substr($lang[$i], 0, 2) == "fr") {
				$deflang = "fr";
				break;
			}
		}
	?>
	<select name="language"><option value="en_EN">English</option><option value="fr_FR.UTF8"<?php echo ($deflang == "fr") ? " selected" : ""; ?>>Français</option></select>
	</p>
	<p style="text-align: center;">
	<input type="submit" value="<?php echo _("Login"); ?>" onclick="guest()"/>
	</p>
</form>
<div>

<?php include "bottom_page.php"; ?>
